Skip to content

fix: edit items in place when stripping prefixes, do not use regex#708

Merged
m90 merged 2 commits into
mainfrom
fr/no-preg
Dec 13, 2023
Merged

fix: edit items in place when stripping prefixes, do not use regex#708
m90 merged 2 commits into
mainfrom
fr/no-preg

Conversation

@m90

@m90 m90 commented Dec 13, 2023

Copy link
Copy Markdown
Contributor

Running the command in staging made the command exit

In RebuildQueryserviceData.php line 159:
                                                                                       
  Allowed memory size of 134217728 bytes exhausted (tried to allocate 33554440 bytes)  
                                                                                       

I'm not entirely sure what exactly consumes so much memory, but this PR tries to mitigate this by doing two things:

  • edit the array of IDs in place
  • use split instead of preg_replace

@deer-wmde deer-wmde left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exciting, let's see what happens! 🤞

@m90
m90 merged commit dcb787f into main Dec 13, 2023
@m90
m90 deleted the fr/no-preg branch December 13, 2023 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants